import { getAction,deleteAction,putAction,postAction} from '@/api/manage'
import { axios } from '@/utils/request'

////根路径
// const doMian = "/jantd-boot/";
////图片预览请求地址
// const imgView = "http://localhost:8080/jantd-boot/sys/common/view/";

//
// 服务管理
const addServer= (params)=>postAction("/sys/myserver/add",params);
const editServer= (params)=>putAction("/sys/myserver/edit",params);
const serverall = (params)=>getAction("/sys/myserver/serverall",params);
const loginuser = (params)=>getAction("/sys/myserver/loginuser",params);

const serverlist = (params)=>getAction("/sys/myserver/mylist",params);

const addUUid= (params)=>postAction("/sys/myserver/addUUid",params);
const editUUid= (params)=>putAction("/sys/myserver/editUUid",params);
const addVirtual=(params)=>postAction("/sys/myvirtual/add",params);
const editVirtual= (params)=>putAction("/sys/myvirtual/edit",params);
const backServer= (params)=>putAction("/sys/myserver/backServer",params);
const statusall= (params)=>getAction("/sys/myserver/statusall",params);
const allocation= (params)=>getAction("/sys/myserver/allocation",params);
// 重复校验
const duplicateCheck = (params)=>getAction("/sys/duplicate/check",params);

export function list(url,parameter) {
  return axios({
    url: url,
    method: 'get',
    params: parameter
  })
}

export function abc(url,parameter) {
  return axios({
    url: url,
    method: 'get',
    params: parameter
  })
}


export function start(url,parameter) {
  return axios({
    url: url,
    method: 'get',
    params: parameter
  })
}

export function stop(url,parameter) {
  return axios({
    url: url,
    method: 'get',
    params: parameter
  })
}


export {
  addServer,
  editServer,
  duplicateCheck,
  serverall,
  loginuser,
  addUUid,
  editUUid,
  addVirtual,
  editVirtual,
  backServer,
  statusall,
  serverlist,
  allocation
}



